<template>
  <div class='over'>
    <tree :model='functions.functions' :is-click="false">
      <span partial>{{row.data.name}}</span>
    </tree>
  </div>
</template>

<script>
export default {
  props: ['functions'],
  title: '左侧树菜单',
  methods: {
    open (row) {
      console.log(row.data)
      if (row.data.link) {
        this.$goto(row.data.link, {f: this.functions}, 'home-page')
      }
    }
  },
  events: {
    'select-changed': function (data) {
      // 事件回调内的 `this` 自动绑定到注册它的实例上
      this.open(data.val)
    }
  }
}
</script>
